import Vue from 'vue'
import {mapGetters, mapMutations} from 'vuex'
import {reg} from './index'

Vue.mixin({
  data() {
    return {
      reg
    }
  },
  computed: {
    ...mapGetters([]),
    vuexUserInfo: {
      get() {
        return this.$store.state.vuexUserInfo
      },
      set(val) {
        this.setVuexUserInfo(val)
      }
    },
    vuexPhone: {
      get() {
        return this.$store.state.vuexPhone
      },
      set(val) {
        this.setVuexPhone(val)
      }
    }
  },
  methods: {
    ...mapMutations(['setVuexUserInfo', 'setVuexPhone']),
    gotoPage(name) {
      this.$router.push({name})
    }
  },
  mounted() {
  }
})
